package com.sex.bull.melancholy.service.mybatis.service;

import com.sex.bull.melancholy.service.mybatis.bean.DetailCustomerProperty;
import com.sex.bull.melancholy.service.mybatis.dao.DetailCustomerPropertyDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * Created by LiM on 2017/8/7.
 * 客户相关属性
 */
@Service
public class DetailCustomerPropertyService {

    @Autowired
    DetailCustomerPropertyDao detailCustomerPropertyDao;

    /**
     * 查询数据
     *
     * @param detailCustomerProperty
     * @return
     * @throws Exception
     */
    public List<DetailCustomerProperty> queryAllList(DetailCustomerProperty detailCustomerProperty) throws Exception {
        return detailCustomerPropertyDao.queryAllList(detailCustomerProperty);
    }

    /**
     * 单条数据新增
     *
     * @param detailCustomerProperty
     */
    public void addData(DetailCustomerProperty detailCustomerProperty) throws Exception {
        detailCustomerPropertyDao.addData(detailCustomerProperty);
    }

    /**
     * 批量新增数据
     *
     * @param objs
     */
    public void addData(List<DetailCustomerProperty> objs) throws Exception {
        detailCustomerPropertyDao.addData(objs);
    }

    /**
     * 更新单条数据
     *
     * @param detailCustomerProperty
     */
    public void updateData(DetailCustomerProperty detailCustomerProperty) throws Exception {
        detailCustomerPropertyDao.updateData(detailCustomerProperty);
    }

    /**
     * 逻辑删除数据
     *
     * @param detailCustomerProperty
     * @throws Exception
     */
    public void deleteData(DetailCustomerProperty detailCustomerProperty) throws Exception {
        detailCustomerPropertyDao.deleteData(detailCustomerProperty);
    }

    /**
     * 批量查询
     * @param list
     * @return
     * @throws Exception
     */
    public List<DetailCustomerProperty> queryByPara(List<DetailCustomerProperty> list) throws Exception{
        return detailCustomerPropertyDao.queryByPara(list);
    }

    /**
     * 更新属性
     * @param mPara
     * @throws Exception
     */
    public void updataByMap(Map<String, Object> mPara) throws Exception{
        detailCustomerPropertyDao.updataByMap(mPara);
    }
}
